1. Field of the Invention
The present invention relates to a non-volatile semiconductor storage device, and more particularly to a non-volatile semiconductor storage device capable of electrically erasing and programming data.
2. Description of the Background Art
Some non-volatile semiconductor storage devices perform operations such as programming, erasing, and various controls on the basis of commands from an external device. Further, the non-volatile semiconductor storage device has some modes so as to be initialized during the manufacturing process. The mode is switched on the basis of the commands externally supplied. However, when a user arbitrarily changes the initial setting, the non-volatile semiconductor storage device malfunctions. Therefore, the non-volatile semiconductor storage device is constructed such that the user cannot execute commands for shifting to modes for performing the initial setting. Commands for shifting a mode to various test modes are taken as examples of commands which the user is prohibited from executing as described above. As an example of such command, a command for reading or writing configuration data in the non-volatile semiconductor storage device can be taken.
Further, the non-volatile semiconductor storage device is provided with a command which is to be set by a user so as to or so as not to be prohibited from being executed. As an example of such command, a command for protecting a predetermined memory area (hereinafter, referred to as a protect command) can be taken. The protect command is a command for prohibiting programming into or erasing from the predetermined memory area to protect the data and programs stored in the memory area from the damage caused by runaway of CPU, noise, or the like.
As described above, a command which is executed at the initialization and prohibited from being executed by a user and a command which is to be set, by a user, so as to be prohibited from being executed, are referred to as a “specific command”. Hereinafter, a protect command is taken as an example of the specific command.
A construction of a prior art non-volatile semiconductor storage device will be described with reference to the drawings. FIG. 4 is a block diagram illustrating a typical construction of the prior art non-volatile semiconductor storage device. The non-volatile semiconductor storage device 401 shown in FIG. 4 comprises a memory cell array 402, an erasure block 402a, a configuration data storage area 402b, an address decoder 403, a reading/programming circuit 404, an erasing and programming control circuit 405, a protection data programming control circuit 405a, a power supply circuit 406, a control circuit 407, a command decoder 408, a data multiplexer (Data MUX) 409, a data processing unit (DPU) 410, protect registers 411, a protect information signal line 412, an erasing and programming prohibition circuit 413, an address counter 414, an input/output data bus 415, an output bus 416, and an input bus 417.
Next, a process of executing a protect command to protect an erasure block 402a will be described. Initially, the protect command and an address of a target erasure block 402a to be protected are inputted to the command decoder 408. The command decoder 408 decodes the inputted protect command and outputs the resultant signal to the control circuit 407.
The control circuit 407 outputs a protection instruction to the protection data programming control circuit 405a on the basis of the signal outputted from the command decoder 408, thereby to control the address counter 414 and the DPU 410 and set the number of the target erasure block 402a to be protected in the configuration data storage area 402b. Further, the control circuit 407 transfers, through the reading/programming circuit 404, data for protecting the erasure block 402a to the protect register 411 corresponding to the number of the target erasure block 402a. Thereby, the erasure block 402a is protected, thereby protecting the data and programs stored in the block.
However, in general, once the memory area is protected, the memory area cannot be easily unprotected. Therefore, the memory area which has been protected by erroneously executing a protect command due to runaway of CPU, noise or the like becomes a faulty area. Moreover, in a case where a command for shifting to a test mode is erroneously issued, there is a possibility of the configuration data being erased and programmed, thereby resulting in a malfunction in the non-volatile semiconductor storage device in some cases.